Preparing Workspace
Before you develop a new robot control application you should make sure that all NXT handles, global variables and settings are resetted and the old figures are closed. To make sure you are working with a clean workspace use:
COM_CloseNXT('all') clear all close all
at the beginning of your main robot application.